class Area {
    String areaId
    String name
    Container container
    Type type;
    //Access access

    static belongsTo = Container
    static hasMany = [employed : Employee, courses : Course, projects : Project, tabs : Tab]
    
    static constraints = {
        container(nullable:true)
    }

    public boolean hasTab(String t){
        if(tabs.contains(Tab.findByName(t))){
            return true;
        }
        return false;
    }
    
    String toString(){"${this.name}"}
}
